<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Base64转码</title>
</head>
<body>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f8f9fa;
            margin: 0;
            padding: 20px;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .textarea {
            width: 100%;
            height: 200px;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
            resize: vertical;
        }
        .div_submit {
            text-align: center;
            margin-top: 20px;
        }
        h4 {
            color: #333;
            margin-bottom: 20px;
        }
        button {
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        button:hover {
            background-color: #0056b3;
        }
        a {
            color: #007bff;
            text-decoration: none;
        }
        a:hover {
            text-decoration: underline;
        }
    </style>
    <div class="container">
        <form action="/Base64_tools" method="post">
            <div class="div_submit">
                <h4>Base64转换</h4>
                <label>
                    <a href="javascript:history.back()">返回上一级</a>
                    <br>
                    <textarea class="textarea" name="befor_data" placeholder="请输入要转换的内容">{{befor_data}}</textarea>
                </label>
                <br>
                <button type="submit" name="submit_type" value="b64encode">b64加密</button>
                <button type="submit" name="submit_type" value="b64decode">b64解密</button>
                <br>
                <textarea class="textarea" placeholder="转换结果将显示在这里">{{after_data}}</textarea>
            </div>
        </form>
    </div>
</body>
</html>